package com.example.touch.domain;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;

import com.example.touch.communication.entities.OpenBrowser;

public class OpenBrowserAction extends AbstractActivityAction<OpenBrowser>
{
	public OpenBrowserAction(Activity activity, OpenBrowser action)
	{
		super(activity, action);
	}

	@Override
	protected void executeAction() 
	{
		Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getAction().getUrl()));
		getActivity().startActivity(browserIntent);
	}
}
